]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Animate whole icon tile when expanding label
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Fri, 5 Jun 2026 08:43:45 +0000 (16:43 +0800)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 29 Jun 2026 17:48:03 +0000 (19:48 +0200)
This gives a smoother whole-tile expand animation, while retaining the
old ellipsize-and-shift-up collapse animation.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4247>
(cherry picked from commit 32171c0be245829746755987816a89b7de472486)

js/ui/appDisplay.js

index 105796dc28cd45d52aa80b48c725be4571a0ce12..f967b5ea65f26e20f0b14bd51a2eabd0d7653d1d 100644 (file)
@@ -1896,16 +1896,21 @@ class AppViewItem extends St.Button {
         if (!layout.is_wrapped() && !layout.is_ellipsized())
             return;
 
-        label.remove_transition('allocation');
+        const expand = this._forcedHighlight || this.hover || this.has_key_focus();
+        if (this._expand === expand)
+            return;
+        this._expand = expand;
 
-        const id = label.connect('notify::allocation', () => {
-            label.restore_easing_state();
-            label.disconnect(id);
+        const leader = expand ? this : label;
+        leader.remove_transition('allocation');
+
+        const id = leader.connect('notify::allocation', () => {
+            leader.restore_easing_state();
+            leader.disconnect(id);
         });
 
-        const expand = this._forcedHighlight || this.hover || this.has_key_focus();
-        label.save_easing_state();
-        label.set_easing_duration(expand
+        leader.save_easing_state();
+        leader.set_easing_duration(expand
             ? APP_ICON_TITLE_EXPAND_TIME
             : APP_ICON_TITLE_COLLAPSE_TIME);
         clutterText.set({